﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GoF23Learning._17.Mediator_Pattern
{
    public class CutMenuItem
    {
        TextArea textAra;
        ClipBorad clipBorad;
        ToobarButton toolbarButton;
        public CutMenuItem()
        {
            textAra = new TextArea();

            clipBorad = new ClipBorad();
            toolbarButton = new ToobarButton();
        }

        public void Click()
        {
            string text = textAra.SelectionText();
            textAra.RemoveSelectionText();

            clipBorad.SetData(text);
            toolbarButton.EnabledPasteButton(true);

        }
    }
}
